<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>07_盒子模型边框与内间距</title>
    <style>
        .z1 {
            width: 200px;
            height: 200px;
            background-color: lightgreen;
            border: 5px solid green;
            border-bottom: 15px dotted red;
            margin-bottom: 30px;
        }
        .z2 {
            width: 200px;
            height: 200px;
            background-color: lightsalmon;
            /*圆角边框，值越大，角越圆，值为正方形边的一半时为圆形*/
            border-radius:100px;
            margin-bottom: 30px;
        }
        .z3 {
            width: 200px;
            height: 60px;
            background-color: lightblue;
            /*胶囊型*/
            border-radius: 30px;
            margin-bottom: 30px;
        }

        .z4 {
            width: 200px;
            height: 200px;
            background-color: cyan;
            border: 10px solid blue;
            padding: 20px;
            margin: 50px; /*外间距不属于元素本身*/

            /*切换为边框盒子
            效果：将内间距+边框+内容都算在预设的宽高之内，靠压缩内容实现*/
            box-sizing: border-box;
        }



    </style>
</head>
<body>
<div class="fu">
    <div class="z1"></div>
    <div class="z2"></div>
    <div class="z3"></div>
    <div class="z4"></div>
</div>
</body>
</html>